//---------------------------------------------------------------------------

#ifndef cFormBaseH
#define cFormBaseH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "JvBalloonHint.hpp"
#include "JvButton.hpp"
#include "JvComponentBase.hpp"
#include "JvExControls.hpp"
#include "JvExExtCtrls.hpp"
#include "JvExtComponent.hpp"
#include "JvGradientHeaderPanel.hpp"
#include "JvImage.hpp"
#include "JvImageList.hpp"
#include "JvMenus.hpp"
#include "JvPanel.hpp"
#include "JvTransparentButton.hpp"
#include "JvVersionControlActions.hpp"
#include <ActnList.hpp>
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>

//---------------------------------------------------------------------------

enum TMyWindowState { MyNormal, MyMinimized, MyMaximizedAllScreen, MyMaximizedDesktop };

#define Wm_SysCommand			0x0112
#define SC_size						0xF000


class TControlOnMouseMove : public TControl
{
	__published:
		__property OnMouseMove = {read=FOnMouseMove, write=FOnMouseMove};

 };

class TfFormBase : public TForm
{
__published:	// IDE-managed Components
	TJvGradientHeaderPanel *JvGHPanelMaster;
	TJvGradientHeaderPanel *jvGHPanelButton;
	TJvPanel *jvPResizeForm;
	TJvGradientHeaderPanel *jvGHPanelTop;
	TJvTransparentButton *tbtnMax;
	TJvTransparentButton *tbtnClose;
	TJvTransparentButton *tbtnNormal;
	TJvTransparentButton *tbtnMin;
	TJvImage *JvImageIcon;
	TJvGradientHeaderPanel *JvGradientHeaderPanel1;
	TJvPanel *jvPanelLeft;
	TJvPanel *jvPanelRight;
	TJvPanel *jvPanelButton;
	TJvPanel *jvPanelTop;
	TJvVersionControlActionList *JvVersionControlActionList;
	TAction *actCloseForm;
	TAction *actMaxForm;
	TAction *actNormalForm;
	TAction *actMinForm;
	TJvImageList *JvImageListAllButton;
	TJvPopupMenu *JvPopupMenuPasekTop;
	TMenuItem *Zamknij1;
	TJvImageList *JvImageListPasekButton;
	TJvBalloonHint *JvBalloonHint;
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall actCloseFormExecute(TObject *Sender);
	void __fastcall jvGHPanelTopMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
          int X, int Y);
	void __fastcall jvGHPanelTopDblClick(TObject *Sender);
	void __fastcall actMaxFormExecute(TObject *Sender);
	void __fastcall RefreshForm(TObject *Sender, TMyWindowState WinState);
	void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
	void __fastcall actNormalFormExecute(TObject *Sender);
	void __fastcall actMinFormExecute(TObject *Sender);
	void __fastcall jvPResizeFormMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall JvPanelRightMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall jvPanelTopMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall jvPanelButtonMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall jvPanelLeftMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
	//__property OnMouseMove = {read=FOnMouseMove, write=FOnMouseMove};
private:	// User declarations
	/**
			* zmienna FormMaximizedAllScreen okresla czy rozszerzamy rozmiar okna na Maximim ekranu z zakryciem  paska zadan
			* true - form na caly ekran monitora
			* false - forma na calym pulpicie, widocznym paskiem zadan
		*/
	__property bool FormMaximizedAllScreen = { read=FformMaximizedAllScreen, write=FformMaximizedAllScreen, default=true};
	TMyWindowState MyWindowsState;
	int MyNormalWinStateHeight;
	int MyNormalWinStateLeft;
	int MyNormalWinStateTop;
	int MyNormalWinStateWidth;
	bool FformMaximizedAllScreen;
	int	iShowTimeHint;
	TObject	*LastShowHintControl;
public:		// User declarations
	__fastcall TfFormBase(TComponent* Owner);
	void __fastcall CreateParams(Controls::TCreateParams &Params);
};
//---------------------------------------------------------------------------
extern PACKAGE TfFormBase *fFormBase;
//---------------------------------------------------------------------------
#endif
